package com.proton.carepatchtemp.utils;

import android.content.Context;

/**
 * Created by wangmengsi on 2017/10/20.
 */

public class Utils {
    /**
     * cnvert dip to px
     *
     * @param context context
     * @param dpValue dip value
     * @return dp value
     */
    public static int dip2px(Context context, float dpValue) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dpValue * scale + 0.5f);
    }
}
